home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / iterative.z / iterative
Encoding:
Text File  |  2002-10-03  |  18.7 KB  |  397 lines

  1.  
  2.  
  3.  
  4. IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))                                                    IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      DDDDIIIItttteeeerrrraaaattttiiiivvvveeee, DDDDIIIItttteeeerrrraaaattttiiiivvvveeee____DDDDrrrrooooppppTTTToooollll, DDDDIIIItttteeeerrrraaaattttiiiivvvveeee____DDDDrrrrooooppppSSSSttttoooorrrraaaaggggeeee - Parallel sparse
  10.      iterative linear system solver
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      Fortran synopsis:
  14.  
  15.           SSSSUUUUBBBBRRRROOOOUUUUTTTTIIIINNNNEEEE DDDDIIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE ((((_n,,,,  _p_o_i_n_t_e_r_s,,,,  _i_n_d_i_c_e_s,,,, _v_a_l_u_e_s,,,,  _s_t_o_r_a_g_e,,,,  _x,,,,
  16.           _b,,,, _m_e_t_h_o_d,,,,  _p_r_e_c_o_n_d,,,,  _m_a_x_i_t_e_r_s,,,, _c_o_n_v_t_o_l,,,,  _i_t_e_r_s,,,,  _f_i_n_a_l_r_e_s))))
  17.           IIIINNNNTTTTEEEEGGGGEEEERRRR _n,,,, _s_t_o_r_a_g_e,,,,  _m_e_t_h_o_d,,,,  _p_r_e_c_o_n_d,,,, _m_a_x_i_t_e_r_s,,,, _i_t_e_r_s
  18.           IIIINNNNTTTTEEEEGGGGEEEERRRR _p_o_i_n_t_e_r_s(*), _i_n_d_i_c_e_s(*)
  19.           DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN _v_a_l_u_e_s(*),,,, _x(*),,,, _b(*)
  20.           DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN _c_o_n_v_t_o_l,,,, _f_i_n_a_l_r_e_s
  21.  
  22.           SSSSUUUUBBBBRRRROOOOUUUUTTTTIIIINNNNEEEE DDDDIIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE____DDDDRRRROOOOPPPPTTTTOOOOLLLL ((((_D_r_o_p_T_o_l_e_r_a_n_c_e))))
  23.           DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN _D_r_o_p_T_o_l_e_r_a_n_c_e
  24.  
  25.           SSSSUUUUBBBBRRRROOOOUUUUTTTTIIIINNNNEEEE DDDDIIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE____DDDDRRRROOOOPPPPSSSSTTTTOOOORRRRAAAAGGGGEEEE ((((_S_t_o_r_a_g_e__M_u_l_t_i_p_l_i_e_r))))
  26.           DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN _S_t_o_r_a_g_e__M_u_l_t_i_p_l_i_e_r
  27.  
  28.      C/C++ synopsis:
  29.  
  30.           ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____ssssppppaaaarrrrsssseeee....hhhh>>>>
  31.  
  32.           vvvvooooiiiidddd DDDDIIIItttteeeerrrraaaattttiiiivvvveeee ((((iiiinnnntttt _n, iiiinnnntttt _p_o_i_n_t_e_r_s[[[[]]]],,,, iiiinnnntttt _i_n_d_i_c_e_s[[[[]]]],,,, ddddoooouuuubbbblllleeee
  33.           _v_a_l_u_e_s[[[[]]]],,,, iiiinnnntttt _s_t_o_r_a_g_e,,,, ddddoooouuuubbbblllleeee _x[[[[]]]],,,, ddddoooouuuubbbblllleeee _b[[[[]]]],,,, iiiinnnntttt _m_e_t_h_o_d,,,, iiiinnnntttt
  34.           _p_r_e_c_o_n_d,,,, iiiinnnntttt _m_a_x_i_t_e_r_s,,,, ddddoooouuuubbbblllleeee _c_o_n_v_t_o_l,,,, iiiinnnntttt *_i_t_e_r_s,,,, ddddoooouuuubbbblllleeee *_f_i_n_a_l_r_e_s))))
  35.  
  36.           vvvvooooiiiidddd DDDDIIIItttteeeerrrraaaattttiiiivvvveeee____DDDDrrrrooooppppTTTToooollll ((((ddddoooouuuubbbblllleeee _d_r_o_p__t_o_l_e_r_a_n_c_e ))));;;;
  37.  
  38.           vvvvooooiiiidddd DDDDIIIItttteeeerrrraaaattttiiiivvvveeee____DDDDrrrrooooppppSSSSttttoooorrrraaaaggggeeee ((((ddddoooouuuubbbblllleeee _s_t_o_r_a_g_e__m_u_l_t_i_p_l_i_e_r ))));;;;
  39.  
  40. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  41.      These routines are part of the SCSL Scientific Library and can be loaded
  42.      using either the ----llllssssccccssss or the ----llllssssccccssss____mmmmpppp option.  The ----llllssssccccssss____mmmmpppp option
  43.      directs the linker to use the multi-processor version of the library.
  44.  
  45.      When linking to SCSL with ----llllssssccccssss or ----llllssssccccssss____mmmmpppp, the default integer size is
  46.      4 bytes (32 bits). Another version of SCSL is available in which integers
  47.      are 8 bytes (64 bits). This version allows the user access to larger
  48.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  49.      by using the ----llllssssccccssss____iiii8888 option or the ----llllssssccccssss____iiii8888____mmmmpppp option.  A program may
  50.      use only one of the two versions; 4-byte integer and 8-byte integer
  51.      library calls cannot be mixed.
  52.  
  53.      The C and C++ prototypes shown above are appropriate for the 4-byte
  54.      integer version of SCSL. When using the 8-byte integer version, the
  55.      variables of type iiiinnnntttt become lllloooonnnngggg lllloooonnnngggg and the <<<<ssssccccssssllll____ssssppppaaaarrrrsssseeee____iiii8888....hhhh>>>> header
  56.      file should be included.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))                                                    IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))
  71.  
  72.  
  73.  
  74. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  75.      DDDDIIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE uses iterative techniques to solve the sparse system of
  76.      equations
  77.  
  78.           _A _x = _b.
  79.  
  80.      Four different parallel preconditioned iterative solvers can be chosen:
  81.      conjugate gradient (CG) and  conjugate residual (CR) for symmetric
  82.      systems, and conjugate gradient squared (CGS) and BiCGSTAB, a variant of
  83.      CGS with smoother convergence properties, for unsymmetric systems.
  84.  
  85.      Several preconditioning schemes are available: Jacobi, symmetric
  86.      successive over-relaxation (SSOR), incomplete LU (ILU) by pattern, also
  87.      known as no-fill ILU, and incomplete LU by value, also known as
  88.      thresholded ILU. In this release, the incomplete LU preconditioners are
  89.      only available for symmetric matrices, specifically, they are incomplete
  90.      LDLT (ILDLT) preconditioners. The ILDLT by value currently does not run
  91.      in parallel.
  92.  
  93.      Two additional routines control parameters for the LDLT by value
  94.      preconditioner:
  95.  
  96.      *   DDDDIIIItttteeeerrrraaaattttiiiivvvveeee____DDDDrrrrooooppppTTTToooollll(((()))) allows the user to set the drop tolerance for
  97.          the incomplete factorization.
  98.  
  99.      *   DDDDIIIItttteeeerrrraaaattttiiiivvvveeee____DDDDrrrrooooppppSSSSttttoooorrrraaaaggggeeee(((()))) allows the user to control the amount of
  100.          storage used for the incomplete factor.
  101.  
  102.    SSSSppppaaaarrrrsssseeee MMMMaaaattttrrrriiiixxxx FFFFoooorrrrmmmmaaaatttt
  103.      Sparse matrix _A must be input to DDDDIIIItttteeeerrrraaaattttiiiivvvveeee in Compressed Sparse Column
  104.      Storage format (CSC) (also known as Harwell-Boeing format) or Compressed
  105.      Sparse Row Storage format (CSR).
  106.  
  107.      The matrix is held in three arrays: _p_o_i_n_t_e_r_s, _i_n_d_i_c_e_s, and _v_a_l_u_e_s. In CSC
  108.      format, the _i_n_d_i_c_e_s array contains the row indices of the non-zeros in _A.
  109.      The _v_a_l_u_e_s array holds the corresponding non-zero values. The _p_o_i_n_t_e_r_s
  110.      array contains the index in _i_n_d_i_c_e_s for the first non-zero in each column
  111.      of _A.  Thus, the row indices for the non-zeros in column _i can be found
  112.      in locations _i_n_d_i_c_e_s[[[[_p_o_i_n_t_e_r_s[[[[_i]]]]]]]] through _i_n_d_i_c_e_s[[[[_p_o_i_n_t_e_r_s[[[[_i+1]]]]-1]]]]. The
  113.      corresponding values can be found in location _v_a_l_u_e_s[[[[_p_o_i_n_t_e_r_s[[[[_i]]]]]]]] through
  114.      _v_a_l_u_e_s[[[[_p_o_i_n_t_e_r_s[[[[_i+1]]]]-1]]]].
  115.  
  116.      For a symmetric matrix _A, the user must input either the lower or upper
  117.      triangle of _A, but not both.  Non-zeroes within a column of _A can be
  118.      stored in any order.
  119.  
  120.      In the following example, the symmetric matrix:
  121.  
  122.               1.0
  123.               0.0  3.0
  124.               2.0  0.0  5.0
  125.               0.0  4.0  0.0  6.0
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))                                                    IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      stored in CSC format would be represented in FORTRAN as follows:
  141.  
  142.           INTEGER pointers(5), indices(6), i
  143.           DOUBLE PRECISION values(6)
  144.           DATA (pointers(i), i = 1, 5) / 1, 3, 5, 6, 7 /
  145.           DATA (indices(i),  i = 1, 6) / 1, 3, 2, 4, 3, 4 /
  146.           DATA (values(i),   i = 1, 6) / 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 /
  147.  
  148.  
  149.      Zero-based indexing is used in C, so the _p_o_i_n_t_e_r_s and _i_n_d_i_c_e_s arrays
  150.      would instead contain the following:
  151.  
  152.           int pointers[]  = {0, 2, 4, 5, 6}
  153.           int indices[]   = {0, 2, 1, 3, 2, 3}
  154.           double values[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}
  155.  
  156.  
  157.  
  158.  
  159.      In CSR format, the _i_n_d_i_c_e_s array contains the column indices of the non-
  160.      zeros in _A.  The _v_a_l_u_e_s array holds the corresponding non-zero values.
  161.      The _p_o_i_n_t_e_r_s array contains the index in _i_n_d_i_c_e_s for the first non-zero
  162.      in each row of _A.  Thus, the colunm indices for the non-zeros in row _i
  163.      can be found in locations _i_n_d_i_c_e_s[[[[_p_o_i_n_t_e_r_s[[[[_i]]]]]]]] through
  164.      _i_n_d_i_c_e_s[[[[_p_o_i_n_t_e_r_s[[[[_i+1]]]]-1]]]]. The corresponding values can be found in
  165.      location _v_a_l_u_e_s[[[[_p_o_i_n_t_e_r_s[[[[_i]]]]]]]] through _v_a_l_u_e_s[[[[_p_o_i_n_t_e_r_s[[[[_i+1]]]]-1]]]].
  166.  
  167.      Using the same symmetric matrix as in the above example:
  168.  
  169.               1.0
  170.               0.0  3.0
  171.               2.0  0.0  5.0
  172.               0.0  4.0  0.0  6.0
  173.  
  174.  
  175.      the corresponding CSR format would be represented in FORTRAN as follows:
  176.  
  177.           INTEGER pointers(5), indices(6), i
  178.           DOUBLE PRECISION values(6)
  179.           DATA (pointers(i), i = 1, 5) / 1, 2, 3, 5, 7 /
  180.           DATA (indices(i),  i = 1, 6) / 1, 2, 1, 3, 2, 4 /
  181.           DATA (values(i),   i = 1, 6) / 1.0, 3.0, 2.0, 5.0, 4.0, 6.0 /
  182.  
  183.  
  184.      Zero-based indexing is used in C, so the _p_o_i_n_t_e_r_s and _i_n_d_i_c_e_s arrays
  185.      would instead contain the following:
  186.  
  187.           int pointers[]  = {0, 1, 2, 4, 6}
  188.           int indices[]   = {0, 1, 0, 2, 1, 3}
  189.           double values[] = {1.0, 3.0, 2.0, 5.0, 4.0, 6.0}
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))                                                    IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))
  203.  
  204.  
  205.  
  206.      These routines have the following arguments:
  207.  
  208.      _n         (input) Integer. The number of rows and columns in the matrix
  209.                _A.  _n>=_0.
  210.  
  211.      _p_o_i_n_t_e_r_s, _i_n_d_i_c_e_s, _v_a_l_u_e_s
  212.                (input) The _p_o_i_n_t_e_r_s and _i_n_d_i_c_e_s arrays store the non-zero
  213.                structure of sparse input matrix _A in Compressed Sparse Column
  214.                (CSC) or Compressed Sparse Row (CSR) format.
  215.  
  216.                In CSC format, the _p_o_i_n_t_e_r_s array stores _n+1 integers, where
  217.                _p_o_i_n_t_e_r_s[[[[_i]]]] gives the index in _i_n_d_i_c_e_s of the first non-zero in
  218.                column _i of _A.  The _i_n_d_i_c_e_s array stores the row indices of the
  219.                non-zeros in _A.  The _v_a_l_u_e_s array stores the non-zero values in
  220.                the matrix _A.
  221.  
  222.      _s_t_o_r_a_g_e   (input) An integer. Specifies if the matrix is stored by
  223.                columns or by rows.  If _s_t_o_r_a_g_e====0000, the matrix is stored by
  224.                columns (CSC), if _s_t_o_r_a_g_e====1111, the matrix is stored by rows
  225.                (CSR).
  226.  
  227.      _x         (input/output) The initial guess and final solution vector.
  228.  
  229.      _b         (input) The right-hand-side vector in a DDDDIIIItttteeeerrrraaaattttiiiivvvveeee call.
  230.  
  231.      _m_e_t_h_o_d    (input) An integer specifying the iterative method used.
  232.  
  233.                _m_e_t_h_o_d = 0: conjugate gradient
  234.  
  235.                _m_e_t_h_o_d = 1: conjugate residual
  236.  
  237.                _m_e_t_h_o_d = 10: conjugate gradient squared
  238.  
  239.                _m_e_t_h_o_d = 11: BiCGSTAB
  240.  
  241.      _p_r_e_c_o_n_d   (input) An integer specifying the preconditioner used.  0000 <<<<====
  242.                _m_e_t_h_o_d <<<<==== 3333....
  243.  
  244.                _p_r_e_c_o_n_d = 0: use Jacobi preconditioner.  This option is not yet
  245.                supported for unsymmetric matrices stored in CSC format.
  246.  
  247.                _p_r_e_c_o_n_d = 1: use SSOR preconditioner
  248.  
  249.                _p_r_e_c_o_n_d = 2: use no-fill ILU preconditioner
  250.  
  251.                _p_r_e_c_o_n_d = 3: use thresholded ILU preconditioner
  252.  
  253.      _m_a_x_i_t_e_r_s  (input) An integer. The solver terminates once it has performed
  254.                maxiters iterations.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))                                                    IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))
  269.  
  270.  
  271.  
  272.      _c_o_n_v_t_o_l   (input) A double precision number.  The solver terminates when
  273.                the norm of the residual relative to the norm of the right-
  274.                hand-side is less than convtol.
  275.  
  276.      _i_t_e_r_s     (output) The number of iterations performed by DDDDIIIItttteeeerrrraaaattttiiiivvvveeee.
  277.  
  278.      _f_i_n_a_l_r_e_s  (output) A double precision number containing the final 2-norm
  279.                of the residual.
  280.  
  281.      _d_r_o_p__t_o_l_e_r_a_n_c_e
  282.                (input) A double precision argument to DDDDIIIItttteeeerrrraaaattttiiiivvvveeee____DDDDrrrrooooppppTTTToooollll. In
  283.                thresholded factorization, an entry is discarded if it is
  284.                smaller than _d_r_o_p__t_o_l_e_r_a_n_c_e times the corresponding diagonal
  285.                element.
  286.  
  287.      _s_t_o_r_a_g_e__m_u_l_t_i_p_l_i_e_r
  288.                (input) A double precision argument to DDDDIIIItttteeeerrrraaaattttiiiivvvveeee____DDDDrrrrooooppppSSSSttttoooorrrraaaaggggeeee.
  289.                In thresholded factorization, the drop tolerance is
  290.                automatically increased if the incomplete factor matrix
  291.                contains more than _s_t_o_r_a_g_e__m_u_l_t_i_p_l_i_e_r times the number of non-
  292.                zero values in A.
  293.  
  294. EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  295.      Environment variables can control various run-time features:
  296.  
  297.      *   IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE____VVVVEEEERRRRBBBBOOOOSSSSEEEE prints messages about steps taken during
  298.          factorization.
  299.  
  300.      *   IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE____DDDDUUUUMMMMPPPP prints the matrix into the file "ppcr.mat" in CSC
  301.          (Harwell-Boeing) format.
  302.  
  303.      *   IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE____RRRRCCCCMMMM controls matrix reordering.  Ordering of the matrix is
  304.          NOT done be default. This variable, if defined, must be set to one of
  305.  
  306.           0000  no reordering of the matrix is done (equivalent to NOT setting
  307.          ITERATIVE_RCM).
  308.  
  309.           1111  trimmed down version of Cuthill-McKee with only search for
  310.          peripheral nodes and level sets is done.
  311.  
  312.          ----1111  reverse Cuthill-McKee reordering is performed.
  313.  
  314.      *   OOOOMMMMPPPP____NNNNUUUUMMMM____TTTTHHHHRRRREEEEAAAADDDDSSSS determines the number of processors that are used by
  315.          the iterative solver.
  316.  
  317. NNNNOOOOTTTTEEEESSSS
  318.      These routines are optimized and parallelized for the SGI R8000, R10000,
  319.      R12000 and R14000 platforms.
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))                                                    IIIITTTTEEEERRRRAAAATTTTIIIIVVVVEEEE((((3333SSSS))))
  335.  
  336.  
  337.  
  338. SEE ALSO
  339.      IIIINNNNTTTTRRRROOOO____SSSSCCCCSSSSLLLL(3S), IIIINNNNTTTTRRRROOOO____SSSSOOOOLLLLVVVVEEEERRRRSSSS(3S)
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                                                         PPPPaaaaggggeeee 6666
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.